Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(v2): Implement proof-of-concept Docusaurus Debug Dashboard #2928

Merged
merged 2 commits into from
Jun 14, 2020
Merged

feat(v2): Implement proof-of-concept Docusaurus Debug Dashboard #2928

merged 2 commits into from
Jun 14, 2020

Conversation

SamChou19815
Copy link
Contributor

@SamChou19815 SamChou19815 commented Jun 13, 2020

Motivation

This PR implements the docusaurus debug dashboard proposal in #2267.

It utilizes the generated files to produce some useful information. Currently, it only includes resolutions of aliased path and routes list, but we can do more fancy analysis in the future. In the future, we can also make @docusaurus/core to generate more files so that more useful debug information can be displayed.

I included it in the classic preset only in dev to reduce bundle size.

I will add it to the docs once the maintainers think this is a good start.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

yarn start and goto http://localhost:3000/__docusaurus/debug

Screen Shot 2020-06-13 at 01 44 12

Check the preview url to ensure it's not in prod mode.

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 13, 2020
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jun 13, 2020

Deploy preview for docusaurus-2 ready!

Built with commit ca8efe1

https://deploy-preview-2928--docusaurus-2.netlify.app

@yangshun
Copy link
Contributor

This is crazy. Such good work! Btw do let your intern manager know about the Docusaurus work you're doing on the side and you can get him to request for a peer feedback from me. You should get credit for the side Docusaurus work because it's still benefitting Facebook 😄

@SamChou19815 SamChou19815 marked this pull request as ready for review June 13, 2020 03:50
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such good work! Very glad to see that you made the debug dashboard not coupled to any theme. Is there a way to use Infima styles just on this dashboard page regardless of theme?

Next steps would be to add filtering among the routes and maybe nested routes (for docs)


contentLoaded({actions: {addRoute}}) {
addRoute({
path: normalizeUrl([baseUrl, '__docusaurus/debug']),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we ignore the baseUrl? I was thinking the debug pages should be entirely standalone

@yangshun yangshun merged commit 6e37d3f into facebook:master Jun 14, 2020
@yangshun yangshun added the pr: new feature This PR adds a new API or behavior. label Jun 14, 2020
@SamChou19815 SamChou19815 deleted the debug-dashboard branch June 14, 2020 07:43
@slorber
Copy link
Collaborator

slorber commented Jun 15, 2020

that's cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants